<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        let arr=[1,2,3,3,2,1];
        function handler(arr){
            return Array.from(new Set(arr))

        }
        console.log(handler(arr));
        // var set=new Set(arr);
        // console.log(set);
        // var result=Array.from(set);
        // console.log(result);
    </script>
</head>
<body>
    
</body>
</html>